import VueRouter from 'vue-router';
// 导入对应的路由组件
import findMusic from './components/tarbar/findMusic/findMusic'
import personalFM from './components/tarbar/personalFM/personalFM';
import livebroadcast from './components/tarbar/livebroadcast/livebroadcast';
import video from './components/tarbar/video/video';
import friend from './components/tarbar/friend/friend';


import special from './components/tarbar/findMusic/special';
import musiclist from './components/tarbar/findMusic/musiclist';
import musiccharts from './components/tarbar/findMusic/musiccharts';
import musicsinger from './components/tarbar/findMusic/musicsinger';
import newmusic from './components/tarbar/findMusic/newmusic';
import zhuboFM from './components/tarbar/findMusic/zhuboFM';

// 3. 创建路由对象
var router = new VueRouter({
  routes: [
    //配置路由规则
    { path: '/',redirect: '/findMusic'},
    { path: '/findMusic',
      component: findMusic,
      children:[
        {
          path:'/',
          redirect:'/findMusic/special'
        },
        { path: '/findMusic/special' , component: special },
        { path: '/findMusic/musiclist' , component: musiclist },
        { path: '/findMusic/musiccharts' , component: musiccharts },
        { path: '/findMusic/musicsinger' , component: musicsinger },
        { path: '/findMusic/newmusic' , component: newmusic },
        { path: '/findMusic/zhuboFM' , component: zhuboFM }
      ],
    },
    { path: '/personalFM' , component: personalFM },
    { path: '/livebroadcast' , component: livebroadcast },
    { path: '/video' , component: video },
    { path: '/friend' , component: friend },

  ],
  linkActiveClass: 'mui-active', //覆盖 默认高亮的类 默认的类名：router-link-active
})

// 把路由对象暴露出去
export default router